# encoding:utf-8

import requests

'''
文本审核接口
'''

request_url = "https://aip.baidubce.com/rest/2.0/solution/v1/text_censor/v2/user_defined"

params = {"text":"习总书记讲话"}
access_token = '24.8972d02e234fd8140a115390a48aa0f4.2592000.1637995563.282335-25066983'
request_url = request_url + "?access_token=" + access_token
headers = {'content-type': 'application/x-www-form-urlencoded'}
response = requests.post(request_url, data=params, headers=headers)
if response:
    print (response.json())

